package de.baumann.browser.fragments

import android.os.Handler
import de.baumann.browser.R
import de.baumann.browser.adapter.HashOrderAdapter
import de.baumann.browser.api.net.vo.Order
import de.baumann.browser.api.net.vo.PayParam
import de.baumann.browser.iview.IOrderListView

/**
 *@author:
 *@date:2018/12/19 14:41
 *@discription: 算力包订单 已完成
 */
class HashOrderCompletedFragment : BaseHashOrderFragment() {
    override val pageNum: Int
        get() = 0

    companion object {
        val instance: HashOrderCompletedFragment by lazy(mode = LazyThreadSafetyMode.SYNCHRONIZED) {
            HashOrderCompletedFragment()
        }
    }

    override fun getAdapter(): HashOrderAdapter {
        return HashOrderAdapter(R.layout.recycler_item_hash_order_completed, 1)
    }

    override fun initData() {

    }

    override fun onResume() {
        super.onResume()
        Handler().postDelayed({
            getPresenter().getPaidHashOrder()
        }, 3000)
    }


    override fun setOrders(orders: List<Order>?) {
        hashOrderAdapter.setNewData(orders)
    }

    override fun orderCancelled() {
    }


}